#ifndef SELECTZONEUI_H
#define SELECTZONEUI_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>

class SelectZoneUI : public QWidget
{
    Q_OBJECT
public:
    explicit SelectZoneUI(QWidget *parent = nullptr);

    void initTopView();

    void initSelectGroupBtn();

    void initSelectGroupLabel();

    void initSelectGroupTrialBtn();

    void initNumBtn();

    void setSelectGroupLabel();

    void setSelectGroupLabel(QStringList speakerList, QMap<QString, QString> map, int page);

    void setMaxPage(QStringList speakerList);

    QString getFileId();

    void resetSpeakerBtn();

    void resetSelfMonitorBtn();

private:
    QPalette background;

    QList<QPushButton *> selectBtnGroup;

    QList<QLabel *> selectLabelGroup;

    QList<QPushButton *> trialBtnGroup;

    QLabel *inputNum;

    QLabel *pageLabel;

    uint8_t m_page = 0;

    uint8_t m_maxPage = 0;

    QStringList m_speakerIdList;

    QStringList m_selectIdList;

    uint8_t m_tryListenGroupId = 0;

    QPushButton *selfMonitorBtn;

signals:
    void pageInfo(QString);

    void playCmd(QStringList, QString, QString);

    void monitorOpenCmd(QString, QString);

    void zonePageInfo(uint8_t);
private slots:
    void currentSelectBtn();

    void trialGroupBtn();

    void numBtnDone();

    void backBtnDone();

    void upPageDone();

    void downPageDone();

    void selfCurrentSelectBtn();
};

#endif  // SELECTZONEUI_H
